<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/10/17 0017
  Time: 上午 10:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加</title>
    <link rel="stylesheet" href="/static/js/plugins/layui/css/layui.css">
    <link rel="stylesheet" href="/static/css/common.css">
    <script src="/static/js/plugins/jquery.js"></script>
    <script src="/static/js/plugins/layui/layui.js"></script>
    <script type="text/javascript" src="/static/js/voteItem/edit.js"></script>
</head>
<body>
<div class="box-padding15">
    <form action="/voteItem/save" method="post"class="layui-form">
        <input type="hidden" name="voteId" value="${voteItem.voteId}" id="voteId">
        <input type="hidden" name="id" value="${voteItem.id}">
        <div class="layui-form-item">
            <label class="layui-form-label">编号</label>
            <div class="layui-input-block">
                <input type="text" name="sortNo" value="${voteItem.sortNo}" lay-verify="required" placeholder="请输入编号" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">标题</label>
            <div class="layui-input-block">
                <input type="text" name="name" value="${voteItem.name}" lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">内容</label>
            <div class="layui-input-block">
                <input type="text" name="details" value="${voteItem.details}" lay-verify="required" placeholder="请输入内容" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">img</label>
            <div class="layui-input-block">
                <div class="layui-upload">
                    <button type="button" class="layui-btn" id="butt">上传图片</button>
                    <input type="hidden" name="img" id="img" value="${voteItem.img}">
                    <div class="layui-upload-list">
                        <img class="layui-upload-img" style="width: 100px;height: 100px" id="img1" src="/downimg?path=${voteItem.img}">
                        <p id="msg"></p>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <input type="checkbox" name="status" value="1" <c:if test="${voteItem.status eq 1}">checked</c:if> title="发布">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formSubmit">保存</button>
            </div>
        </div>
    </form>
</div>
</body>
</html>
